{extend name="base" /}

{block name="bodyer"}
				当前位置：
				<span class="layui-breadcrumb" lay-separator="/">
					<a><cite>修改密码</cite></a>
				</span>

				<fieldset class="layui-elem-field layui-field-title">
					<legend>修改密码</legend>
				</fieldset>

				<form class="layui-form layui-form-pane" action="" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label">原始密码</label>
						<div class="layui-input-inline">
							<input type="password" name="old_password" lay-verify="required" class="layui-input">
						</div>
						<div class="layui-form-mid layui-word-aux">请填写原始密码</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">新的密码</label>
						<div class="layui-input-inline">
							<input type="password" name="new_password" lay-verify="new_password" class="layui-input">
						</div>
						<div class="layui-form-mid layui-word-aux">请填写新的密码</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">确认密码</label>
						<div class="layui-input-inline">
							<input type="password" name="confirm_password" lay-verify="confirm_password" class="layui-input">
						</div>
						<div class="layui-form-mid layui-word-aux">确认密码必须与新的密码一致</div>
					</div>

					<div class="layui-form-item">
						<div class="layui-input-block">
						<button class="layui-btn" lay-submit="" lay-filter="form-updatePassword">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>

				<script>
					layui.use(['form', 'jquery'], function() {
						var $ = layui.jquery,
							form = layui.form();
						form.verify({
							new_password: [
								/^[\S]{6,18}$/,
								'新的密码必须6到18位，且不能出现空格'
							],
							confirm_password: function(value) {
								if (value != $('[name="new_password"]').val()) {
									return '确认密码必须与新的密码一致';
								}
							}
						});
					});
				</script>
{/block}
